# eric7.WebBrowser.Bookmarks.NsHtmlWriter

Module implementing a class to write Netscape HTML bookmark files.

### Global Attributes

None

### Classes

NsHtmlWriter | Class implementing a writer object to generate Netscape HTML bookmark files.

### Functions

None

## NsHtmlWriter

Class implementing a writer object to generate Netscape HTML bookmark files.

### Derived from

QObject

### Class Attributes

indentSize

### Class Methods

None

### Methods

NsHtmlWriter | Constructor
__write | Private method to write an Netscape HTML bookmark file.
__writeBookmark | Private method to write a bookmark node.
__writeFolder | Private method to write a bookmark node.
__writeItem | Private method to write an entry for a node.
__writeSeparator | Private method to write a separator.
write | Public method to write an Netscape HTML bookmark file.

### Static Methods

None

#### NsHtmlWriter (Constructor)

NsHtmlWriter()

Constructor

#### NsHtmlWriter.__write

__write(root)

Private method to write an Netscape HTML bookmark file.

root (BookmarkNode)
  root node of the bookmark tree

Return:
  flag indicating success

Return Type:
  bool

#### NsHtmlWriter.__writeBookmark

__writeBookmark(node, indent)

Private method to write a bookmark node.

node (BookmarkNode)
  reference to the node to be written
indent (int)
  size of the indentation

#### NsHtmlWriter.__writeFolder

__writeFolder(node, indent)

Private method to write a bookmark node.

node (BookmarkNode)
  reference to the node to be written
indent (int)
  size of the indentation

#### NsHtmlWriter.__writeItem

__writeItem(node, indent)

Private method to write an entry for a node.

node (BookmarkNode)
  reference to the node to be written
indent (int)
  size of the indentation

#### NsHtmlWriter.__writeSeparator

__writeSeparator(indent)

Private method to write a separator.

indent (int)
  size of the indentation

#### NsHtmlWriter.write

write(fileNameOrDevice, root)

Public method to write an Netscape HTML bookmark file.

fileNameOrDevice (str)
  name of the file to write or device to write to (QIODevice)
root (BookmarkNode)
  root node of the bookmark tree

Return:
  flag indicating success

Return Type:
  bool

Up